home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / gcl-1.000 / gcl-1 / gcl-1.0 / h / solaris.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-14  |  2.6 KB  |  127 lines

  1. #define SUN4
  2.   
  3. #include "bsd.h"
  4. #include "sparc.h"
  5.  
  6.  
  7. #ifdef __svr4__
  8. #define UNIXSAVE "unexelf.c"
  9. #ifdef IN_UNIXSAVE
  10. #define round_up round_up1
  11. #define bss_end core_end
  12. #endif
  13. #define ULONG_DEFINED
  14. #undef HAVE_SIGVEC
  15. #define HAVE_SIGACTION
  16. #define SV_ONSTACK SA_ONSTACK
  17.  
  18. #ifdef IN_GBC
  19. #include <siginfo.h>
  20. #endif
  21.  
  22. #define GET_FAULT_ADDR(sig,code,scp,addr) \
  23.   (code ? ((siginfo_t *)code )->si_addr : error("no address info"))
  24.  
  25. #define SETUP_SIG_STACK \
  26. { static stack_t estack ; \
  27.   estack.ss_size = sizeof(estack_buf) ; \
  28.   estack.ss_flags = 0; \
  29.   estack.ss_sp = (char *) &estack_buf[SIG_STACK_SIZE-1]; \
  30.   if (sigaltstack(&estack, (stack_t *)0) < 0) \
  31.                perror("sigaltstack");} \
  32.   
  33. #undef HAVE_AOUT
  34. #define HAVE_AOUT <elf.h>
  35. #define HAVE_ELF
  36.  
  37. #define SEEK_TO_END_OFILE(fp)\
  38.   do {      Elf32_Ehdr eheader; \
  39.           fseek(fp,0,SEEK_SET); \
  40.         fread(&eheader,sizeof(eheader),1,fp); \
  41.           fseek(fp,eheader.e_shoff+(eheader.e_shnum)*eheader.e_shentsize,\
  42.             SEEK_SET); \
  43.                     } while(0)
  44.  
  45.  
  46.  
  47.  
  48. #define USE_ATT_TIME
  49.  
  50. #define GETCWD
  51.  
  52. #define SPECIAL_RSYM "rsym_elf.c"
  53. #define SEPARATE_SFASL_FILE "sfaslelf.c"
  54. #ifdef IN_FILE
  55. #include <sys/filio.h>
  56. #endif
  57.  
  58. #ifdef IN_RUN_PROCESS
  59. #include <sys/sockio.h>
  60. #endif
  61. #endif
  62.  
  63. #ifndef __svr4__
  64. /* sun release 4.1,4.2 */
  65. #define SA_RESTART 0
  66. #define SA_SIGINFO 0
  67. #endif
  68.  
  69. #define ADDITIONAL_FEATURES \
  70.              ADD_FEATURE("SUN"); \
  71.                ADD_FEATURE("SPARC")
  72.  
  73.  
  74. #define SPARC
  75. #define    IEEEFLOAT
  76.   
  77. #define USE_C_EXTENDED_DIV
  78.   
  79. /* setjmp does not lay down the other register windows registers,
  80.    and so we must recurse some to make sure that all registers are
  81.    forced onto the stack.
  82. */   
  83. #define N_RECURSION_REQD 8
  84.   
  85. #define DATA_BEGIN (char *)N_DATADDR(header)
  86.  
  87. #define N_RELOFF N_TRELOFF
  88.  
  89. #define RELOC_FILE "rel_sun4.c"
  90.  
  91. /* width of page size that can be memorprotected log2(getpagesize()) */
  92.    
  93. #define PAGEWIDTH 12 
  94.  
  95.  
  96.  
  97. #define reloc  reloc_info_sparc
  98.  
  99. /* in release 4.0 it is SIGSEGV, and release 4.1 it is SIGBUS */
  100.  
  101.  
  102. #define INSTALL_MPROTECT_HANDLER \
  103. do {static struct sigaction action; \
  104.       action.sa_handler = memprotect_handler; \
  105.     action.sa_flags = SA_RESTART | SA_SIGINFO; \
  106.       sigemptyset(&action.sa_mask); sigaddset(&action.sa_mask,SIGINT); \
  107.         sigaddset(&action.sa_mask,SIGALRM); \
  108.         sigaction(SIGSEGV,&action,0);    sigaction(SIGBUS,&action,0);} while (0)
  109.  
  110.  
  111. #include "sparc.h"
  112.  
  113. /* Begin for cmpinclude */
  114. #ifndef __GNUC__
  115. #define HAVE_ALLOCA
  116. #include <alloca.h>
  117. #endif
  118.  /* If can mprotect pages and so selective gc will work */
  119. #define SGC  
  120.  
  121. /* End for cmpinclude */
  122.  
  123. /* Sun 4.1 needs to have some cached yp stuff undone at save time */
  124.  
  125. #define HAVE_YP_UNBIND
  126.  
  127.